//对象类型
type Person = { uname: string, age: number, sex: boolean }

let person: Person = { uname: 'zhanegen', age: 21, sex: true }
console.log(person);

interface User{
    uname: string,
    age: number,
    adress?:{provice:string,city:string}
}
const user: User = {
    uname: 'wl',
    age: 22,
    adress:{provice:'fd',city:'fso'}
}
console.log(user);


// 接口可以继承，继承就是把别人的拿过来
interface Point2D{
    x: number,
    y:number
}
interface point3D extends Point2D{
    z:number
}
const Point2D = {
    x: 24,
    y: 24,
    z:24
}

export{}